package com.zhiyou.app.shop.website.service.impl;

import java.util.List;

import org.hibernate.criterion.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zhiyou.app.shop.common.util.ShopConstants;
import com.zhiyou.app.shop.website.dao.IMenuDao;
import com.zhiyou.app.shop.website.dao.pojo.Menu;
import com.zhiyou.app.shop.website.service.IMenuService;

@Service(value="menuService")
public class MenuServiceImpl implements IMenuService {
	
	@Autowired
	private IMenuDao menuDao;

	public List<Menu> findMenu() {
		Menu menu = new Menu();
		menu.setFlag(ShopConstants.TRUE);
		return menuDao.findByExample(menu, Order.asc("priority"));
	}

	
}
